from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time

driver = webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(10)
driver.get('http://shop-xo.hctestedu.com/index.php?s=/index/user/logininfo.html')
driver.find_element(By.NAME, 'accounts').send_keys('huace_tester')
driver.find_element(By.NAME, 'pwd').send_keys('huace_tester')
driver.find_element(By.XPATH, '//div[@class="am-tabs-bd"]/div[1]/form/div[3]/button').click()
# driver.find_element(By.XPATH, '//*[@id="collapse-nav-business"]/li[1]/a').click()
# driver.find_element(By.XPATH, '//div[@class="form-table-content"]//span[text()=\'取消\']').click()
# time.sleep(3)
# confirm_button = driver.find_element(By.XPATH, '//div[@class="am-modal-dialog"]//span[@data-am-modal-confirm]')
# confirm_button.click()